package com.hfmall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 
 * </p>
 *
 * @author 橘山修仙人  为单个商品数据拼接实体类
 * @since 2021-08-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class UtilGoodsVO implements Serializable {
//sql语句
//    select gf.goods_name,g.*,c.class_name,v.value from `hf_goods` g,`hf_goods_values` gv, `hf_value` v, `hf_class` c ,`hf_goodsinfo` gf
//    where gv.value_id=v.id and v.class_id=c.id and gv.sku_id=g.id and g.goodsinfo_id=gf.id  and g.id=1;
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String  goodsName;  //商品名(不同规格同一名)

    private Integer goodsinfoId;  //商品共性id

    private String sku;  //单个-具体-商品编号

    private BigDecimal price;  //商品价格

    private Integer stock;  //库存

    private String className;  //规格名称

    private String value;  //规格的值

    @TableField(exist = false)
    private Map<String,String> goodsClassValue; //商品规格

    @TableField(exist = false)
    private String coverPath; //封面图片

    @TableField(exist = false)
    private int num; //数量

    @TableField(exist = false)
    private String values; //规格描述


//    @TableField(exist = false)
//    private List<HfPictures> hfPictureList; //商品图片套图
//
//    @TableField(exist = false)
//    private Map<String,String> goodsClass; //商品规格


}
